.outer-container {
    text-align: center;
    padding: 20px;
}

.ebook-title {
    font-size: 2rem;
    color: #333;
    text-decoration: underline;
    text-decoration-color: #ff9a57; /* เปลี่ยนสีเส้น */
    text-decoration-thickness: 5px; /* เปลี่ยนความหนา */
    text-underline-offset: 10px; /* ระยะห่างระหว่างข้อความกับเส้น */
}

.ebookcontainer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 0;
}

.ebookblock {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 300px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    margin-top: 15px;
}

.ebookblock:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.ebookblock img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.ebookblock h2 {
    font-size: 1.5rem;
    color: #414141;
    margin: 10px 0;}



.ebookcontent {
    padding: 0 15px;
    font-size: 1rem;
    color: #666;
    flex-grow: 1;
}

.ebookbutton {
    display: inline-block;
    margin: 15px 0;
    padding: 10px 20px;
    background: #ff7300;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    transition: background 0.3s ease;
    align-self: center;
}

.ebookbutton:hover {
    background: #0088f7;
}

@media (max-width: 768px) {
    .ebook-title {
        font-size: 1.8rem;
    }

    .ebookcontainer {
        gap: 10px;
        padding: 10px 0;
    }

    .ebookblock {
        width: 90%;
    }
}

@media (max-width: 480px) {
    .ebook-title {
        font-size: 1.5rem;
    }

    .ebookblock {
        width: 100%;
    }
}
